<template>
    <el-menu mode="horizontal" router>
        <HeadMenuItem v-for="(e,i) in ClassList" :key="e.name" :itemInfo="e" @click="$store.commit('setNowClass',i)" />
    </el-menu>
</template>
<script>
    import HeadMenuItem from './HeaderMenuItem.vue'
    import { mapState } from 'vuex'
    export default{
        components:{
            HeadMenuItem
        },
        computed:{
            ...mapState(['ClassList','NowClass'])
        }
    }
</script>
<style scoped>
.el-menu{
    height: 100%;
    width: 100vw;
}
</style>